package TTEST;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JCheckBox;

public class ActionListenerForGenerateCommmands implements ActionListener {

	String name;
	public ActionListenerForGenerateCommmands(String h){
		name=h;
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getSource() instanceof JCheckBoxR){
			System.out.println((JCheckBoxR)e.getSource());
			LabWindow.a.remove(((JCheckBoxR)e.getSource()).getName());
			LabWindow.a.put(((JCheckBoxR)e.getSource()).getName(),((JCheckBoxR)e.getSource()).isSelected());
			LabWindow.showCommand();
			if(e.getSource() instanceof JButton){
			//	LabWindow.command="tutaj\n";
			//	LabWindow.c
			}
				
	}
		
	}

}
